package main

import "fmt"
import "github.com/garyburd/redigo/redis"

func main() {
	c, err := redis.Dial("tcp", "192.168.57.133:6379")
	if err != nil {
		fmt.Println("conn redis failed", err)
	}
	defer c.Close()
	_, err2 := c.Do("Set", "key1", 998)
	if err2 != nil {
		fmt.Println(err2)
		return
	}
	r, err3 := redis.Int(c.Do("Get", "key1"))
	if err3 != nil {
		fmt.Println("get key1 failed", err3)
		return
	}
	fmt.Println(r)
}